﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FieldHost {
	public class SpecializedCollection<TKey, TValue> {
		
		private readonly Dictionary<TKey, TValue> _dictionary = new Dictionary<TKey, TValue>();

		public TValue this[TKey key]{
			get{
				return _dictionary[key];
			}
		}

		public void Add(TKey key, TValue value){
			_dictionary.Add(key, value);
		}

		/// <summary>
		/// Returns a read only list of the values stored in the collection
		/// </summary>
		/// <returns></returns>
		public IList<TValue> GetRawList() {
			List<TValue> list = new List<TValue>(_dictionary.Values);
			return list.AsReadOnly();
		}
	}
}
